Branchwell

PulseCanvas / app · pulsecanvas.ai / Sources / PulseCanvas / Resources / ProjectM / Presets / Geometric / City / martin - city lights.milk

1MILKDROP_PRESET_VERSION=201
2PSVERSION=3
3PSVERSION_WARP=3
4PSVERSION_COMP=3
5[preset00]
6fRating=5.000000
7fGammaAdj=1.980
8fDecay=0.500
9fVideoEchoZoom=1.000
10fVideoEchoAlpha=0.500
11nVideoEchoOrientation=3
12nWaveMode=7
13bAdditiveWaves=1
14bWaveDots=0
15bWaveThick=1
16bModWaveAlphaByVolume=0
17bMaximizeWaveColor=0
18bTexWrap=1
19bDarkenCenter=0
20bRedBlueStereo=0
21bBrighten=0
22bDarken=1
23bSolarize=0
24bInvert=0
25fWaveAlpha=1.059
26fWaveScale=8.991
27fWaveSmoothing=0.000
28fWaveParam=0.000
29fModWaveAlphaStart=0.000
30fModWaveAlphaEnd=0.000
31fWarpAnimSpeed=1.459
32fWarpScale=2.007
33fZoomExponent=1.00000
34fShader=0.000
35zoom=0.99990
36rot=0.00000
37cx=0.500
38cy=0.500
39dx=0.00000
40dy=0.00000
41warp=0.01000
42sx=0.99990
43sy=1.00000
44wave_r=0.000
45wave_g=0.000
46wave_b=0.000
47wave_x=0.500
48wave_y=0.500
49ob_size=0.000
50ob_r=0.000
51ob_g=0.000
52ob_b=0.000
53ob_a=1.000
54ib_size=0.260
55ib_r=0.250
56ib_g=0.250
57ib_b=0.250
58ib_a=0.000
59nMotionVectorsX=64.000
60nMotionVectorsY=48.000
61mv_dx=0.000
62mv_dy=0.000
63mv_l=1.850
64mv_r=0.500
65mv_g=0.500
66mv_b=0.500
67mv_a=0.000
68b1n=0.000
69b2n=0.000
70b3n=0.000
71b1x=0.990
72b2x=1.000
73b3x=1.000
74b1ed=0.000
75wavecode_0_enabled=1
76wavecode_0_samples=200
77wavecode_0_sep=0
78wavecode_0_bSpectrum=0
79wavecode_0_bUseDots=1
80wavecode_0_bDrawThick=0
81wavecode_0_bAdditive=1
82wavecode_0_scaling=0.89152
83wavecode_0_smoothing=0.82000
84wavecode_0_r=0.000
85wavecode_0_g=0.000
86wavecode_0_b=1.000
87wavecode_0_a=0.600
88wave_0_init1=t1 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
89wave_0_init2=t2 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
90wave_0_init3=t3 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
91wave_0_init4=t4 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
92wave_0_init5=t5 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
93wave_0_init6=t6 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
94wave_0_init7=t7 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
95wave_0_init8=t8 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
96wave_0_init9=
97wave_0_per_frame1=t1 = 0;
98wave_0_per_point1=row = (t1/2)%2;
99wave_0_per_point2=wid = (t1+2)%4;
100wave_0_per_point3=dx = 0.014* (row -0.5) + 0.0025* (wid-1.5);
101wave_0_per_point4=x = 0.5 + dx;
102wave_0_per_point5=
103wave_0_per_point6=y = int(t1/4)/50;
104wave_0_per_point7=y = y - int(y);
105wave_0_per_point8=
106wave_0_per_point9=t1 += 1;
107wavecode_1_enabled=0
108wavecode_1_samples=512
109wavecode_1_sep=0
110wavecode_1_bSpectrum=0
111wavecode_1_bUseDots=0
112wavecode_1_bDrawThick=0
113wavecode_1_bAdditive=0
114wavecode_1_scaling=0.89152
115wavecode_1_smoothing=1.00000
116wavecode_1_r=1.000
117wavecode_1_g=0.600
118wavecode_1_b=0.000
119wavecode_1_a=1.000
120wave_1_init1=t1 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
121wave_1_init2=t2 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
122wave_1_init3=t3 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
123wave_1_init4=t4 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
124wave_1_init5=t5 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
125wave_1_init6=t6 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
126wave_1_init7=t7 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
127wave_1_init8=t8 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
128wave_1_init9=
129wave_1_per_frame1=trel = q1-.0;
130wave_1_per_frame2=t1 = int(trel)/2;
131wave_1_per_frame3=t2 = trel - int(trel);
132wavecode_2_enabled=0
133wavecode_2_samples=512
134wavecode_2_sep=0
135wavecode_2_bSpectrum=0
136wavecode_2_bUseDots=0
137wavecode_2_bDrawThick=0
138wavecode_2_bAdditive=0
139wavecode_2_scaling=0.01348
140wavecode_2_smoothing=0.00000
141wavecode_2_r=1.000
142wavecode_2_g=0.600
143wavecode_2_b=0.000
144wavecode_2_a=0.310
145wave_2_init1=t1 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
146wave_2_init2=t2 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
147wave_2_init3=t3 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
148wave_2_init4=t4 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
149wave_2_init5=t5 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
150wave_2_init6=t6 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
151wave_2_init7=t7 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
152wave_2_init8=t8 = 1 + (rand(101)*.01 - rand(101)*.01)*.3;
153wave_2_init9=
154wave_2_per_frame1=trel = q1-.33;
155wave_2_per_frame2=t1 = int(trel)/3;
156wave_2_per_frame3=t2 = trel - int(trel);
157wave_2_per_frame4=
158wave_2_per_frame5=
159wave_2_per_frame6=
160wavecode_3_enabled=0
161wavecode_3_samples=512
162wavecode_3_sep=0
163wavecode_3_bSpectrum=1
164wavecode_3_bUseDots=0
165wavecode_3_bDrawThick=0
166wavecode_3_bAdditive=0
167wavecode_3_scaling=1.00000
168wavecode_3_smoothing=0.50000
169wavecode_3_r=1.000
170wavecode_3_g=0.600
171wavecode_3_b=0.000
172wavecode_3_a=1.000
173wave_3_per_frame1=trel = q1-.66;
174wave_3_per_frame2=t1 = int(trel);
175wave_3_per_frame3=t2 = trel - int(trel);
176shapecode_0_enabled=1
177shapecode_0_sides=12
178shapecode_0_additive=0
179shapecode_0_thickOutline=0
180shapecode_0_textured=0
181shapecode_0_num_inst=44
182shapecode_0_x=0.200
183shapecode_0_y=0.900
184shapecode_0_rad=0.01000
185shapecode_0_ang=0.00000
186shapecode_0_tex_ang=0.00000
187shapecode_0_tex_zoom=0.85169
188shapecode_0_r=0.000
189shapecode_0_g=1.000
190shapecode_0_b=1.000
191shapecode_0_a=1.000
192shapecode_0_r2=0.000
193shapecode_0_g2=0.000
194shapecode_0_b2=0.000
195shapecode_0_a2=1.000
196shapecode_0_border_r=0.000
197shapecode_0_border_g=0.000
198shapecode_0_border_b=0.000
199shapecode_0_border_a=0.200
200shape_0_per_frame1=sides = 4;
201shape_0_per_frame2=nx = instance%6;
202shape_0_per_frame3=ny = int (instance/6);
203shape_0_per_frame4=
204shape_0_per_frame5=if (instance <= 35,
205shape_0_per_frame6= x = 0.5 + (nx-3)/4;
206shape_0_per_frame7= y = 0.5 + (ny-3)/4;
207shape_0_per_frame8= rad = 0.04;
208shape_0_per_frame9= r=0; r2 = 0;
209shape_0_per_frame10=
210shape_0_per_frame11=,
211shape_0_per_frame12= if (instance < 38,
212shape_0_per_frame13= x = 0.5 - 0.47/q32 * (instance%2-0.5);
213shape_0_per_frame14= y = 0.5;
214shape_0_per_frame15= rad = 0.06;
215shape_0_per_frame16= r=0; r2 = 0.6;
216shape_0_per_frame17=,
217shape_0_per_frame18= x = 0.5 - 0.0/q32 * (instance%3-1);
218shape_0_per_frame19= y = 0.5 - 0.47*(int (instance/3)%2-0.5);
219shape_0_per_frame20= rad = 0.06;
220shape_0_per_frame21= r=0.5; r2 = 0.3; ang = 0; sides = 4;
221shape_0_per_frame22=);
222shape_0_per_frame23=);
223shape_0_per_frame24=
224shape_0_per_frame25=g = 0; g2 = 0;
225shape_0_per_frame26=b = nx%2; b2 = !q3 * (instance%4==1);
226shape_0_per_frame27=border_b = 1-b;
227shape_0_per_frame28=a = 1;
228shape_0_per_frame29=a2 = a;
229shape_0_per_frame30=
230shape_0_per_frame31=
231shapecode_1_enabled=1
232shapecode_1_sides=4
233shapecode_1_additive=1
234shapecode_1_thickOutline=1
235shapecode_1_textured=0
236shapecode_1_num_inst=55
237shapecode_1_x=0.600
238shapecode_1_y=0.500
239shapecode_1_rad=0.03300
240shapecode_1_ang=0.00000
241shapecode_1_tex_ang=0.00000
242shapecode_1_tex_zoom=6.16617
243shapecode_1_r=0.400
244shapecode_1_g=1.000
245shapecode_1_b=0.700
246shapecode_1_a=0.900
247shapecode_1_r2=0.000
248shapecode_1_g2=0.000
249shapecode_1_b2=0.000
250shapecode_1_a2=1.000
251shapecode_1_border_r=0.500
252shapecode_1_border_g=0.500
253shapecode_1_border_b=0.500
254shapecode_1_border_a=0.000
255shape_1_per_frame1=
256shape_1_per_frame2=
257shape_1_per_frame3=x = 0.5 + 0.4*sin(instance*reg01);
258shape_1_per_frame4=y = 0.5 + 0.4*sin(instance*reg02);
259shape_1_per_frame5=
260shape_1_per_frame6=rad = 0.14 + 0.06*sin(instance*324.253);
261shape_1_per_frame7=
262shape_1_per_frame8=n = instance * 8 + 10000;
263shape_1_per_frame9=//x = gmegabuf(n);
264shape_1_per_frame10=//y = 1-gmegabuf(n+1);
265shape_1_per_frame11=//rad = gmegabuf(n+2);
266shape_1_per_frame12=//sides = gmegabuf(n+3);
267shape_1_per_frame13=
268shape_1_per_frame14=
269shape_1_per_frame15=//if (instance%8==0, sides = 20, sides = 4);
270shape_1_per_frame16=
271shape_1_per_frame17=
272shape_1_per_frame18=g=0; g2 = 0 ;
273shape_1_per_frame19=r = (instance%2); r2 = 1;
274shape_1_per_frame20=b = 0; b2 = 0.5 * (instance%3>=1);
275shape_1_per_frame21=a = 1;
276shape_1_per_frame22=//rad *= min(1,x*y*4);
277shape_1_per_frame23=a2 = a*0.3;
278shape_1_per_frame24=
279shape_1_per_frame25=
280shapecode_2_enabled=0
281shapecode_2_sides=4
282shapecode_2_additive=0
283shapecode_2_thickOutline=0
284shapecode_2_textured=0
285shapecode_2_num_inst=8
286shapecode_2_x=0.873
287shapecode_2_y=0.130
288shapecode_2_rad=0.29166
289shapecode_2_ang=0.00000
290shapecode_2_tex_ang=2.51327
291shapecode_2_tex_zoom=0.74415
292shapecode_2_r=0.000
293shapecode_2_g=0.000
294shapecode_2_b=0.000
295shapecode_2_a=1.000
296shapecode_2_r2=0.000
297shapecode_2_g2=0.000
298shapecode_2_b2=0.000
299shapecode_2_a2=0.400
300shapecode_2_border_r=0.800
301shapecode_2_border_g=0.500
302shapecode_2_border_b=0.000
303shapecode_2_border_a=0.000
304shape_2_per_frame1=x = 0.7 + instance*0.02;;
305shape_2_per_frame2=y = 0.75;
306shape_2_per_frame3=
307shape_2_per_frame4=
308shape_2_per_frame5=//r = 0.4; r2 = 0.4;
309shape_2_per_frame6=b = 0.3; b2 = b;
310shape_2_per_frame7=rad = 0.04;
311shapecode_3_enabled=0
312shapecode_3_sides=24
313shapecode_3_additive=1
314shapecode_3_thickOutline=0
315shapecode_3_textured=1
316shapecode_3_num_inst=1
317shapecode_3_x=0.550
318shapecode_3_y=0.350
319shapecode_3_rad=0.09863
320shapecode_3_ang=0.00000
321shapecode_3_tex_ang=0.00000
322shapecode_3_tex_zoom=1.31212
323shapecode_3_r=0.000
324shapecode_3_g=1.000
325shapecode_3_b=0.000
326shapecode_3_a=1.000
327shapecode_3_r2=0.000
328shapecode_3_g2=0.600
329shapecode_3_b2=0.000
330shapecode_3_a2=0.000
331shapecode_3_border_r=0.500
332shapecode_3_border_g=0.500
333shapecode_3_border_b=0.500
334shapecode_3_border_a=0.000
335per_frame_init_1=n = 0; loop (10000, gmegabuf(n)=0; n +=1; );
336per_frame_init_2=
337per_frame_init_3=reg01 = int(rand(100)+5);
338per_frame_init_4=reg02 = int(rand(100)+10);
339per_frame_init_5=
340per_frame_init_6=fwx = rand(10);
341per_frame_init_7=fwy = rand(10);
342per_frame_init_8=zang = rand(6);
343per_frame_init_9=
344per_frame_init_10=ran1 = -0.5;
345per_frame_init_11=trad1 = rand(6);
346per_frame_init_12=trad2 = rand(6);
347per_frame_1=dt = 1/fps;
348per_frame_2=dec_m = 1 - 6*dt; dec_s = 1 - 2*dt; dec_xs = 1-dt;
349per_frame_3=vol = bass+mid+treb;
350per_frame_4=vol_ = vol_*dec_m + (1-dec_m)*vol;
351per_frame_5=is_beat = above(vol, .4+vol_+peak) * above (time, t0+.2);
352per_frame_6=t0 = is_beat*time + (1-is_beat)*t0;
353per_frame_7=peak = is_beat * vol + (1-is_beat)*peak*dec_m;
354per_frame_8=index = (index + is_beat) %32;
355per_frame_9=index2 = (index2 + is_beat*bnot(index))%8;
356per_frame_10=index3 = (index3 + is_beat* if(bnot(rand(8)%2),-1,1)*bnot(index%16))%6;
357per_frame_11=
358per_frame_12=num_res = 200; MINBPM = 50; MAXBPM = 200;
359per_frame_13=tess = 0; maxind = 0; qavg = 0.001; i=0;
360per_frame_14=loop (num_res,
361per_frame_15= n = i*8;
362per_frame_16= Freq = (i/(num_res-1)+minbpm/(maxbpm-minbpm))*(maxbpm-minbpm)/60;
363per_frame_17= Feder = sqr(Freq*6.2832); //Res.f = sqrt (Feder)/2pi (Hz)
364per_frame_18= Excite = (vol-vol_);
365per_frame_19= gmegabuf (n+4) = gmegabuf(n+2); //alte pos
366per_frame_20= gmegabuf (n+1) *= 1-0.2*dt; //damping
367per_frame_21=
368per_frame_22= EC_Steps = int (20*Freq*dt)+1;
369per_frame_23= loop (EC_Steps, // Euler-Cauchy steps
370per_frame_24= Kraft = Excite - Feder*gmegabuf(n + 2) ;
371per_frame_25= gmegabuf (n+1) += Kraft * dt/EC_Steps;
372per_frame_26= gmegabuf (n+2) += gmegabuf(n+1) * dt/EC_Steps;
373per_frame_27= );
374per_frame_28= beatcos = gmegabuf(n+1); beatsin = gmegabuf(n+2)*Freq*6.2832;
375per_frame_29= quad = sqrt (pow(beatsin,2) + pow(beatcos,2));
376per_frame_30= gmegabuf (n+3) = gmegabuf(n+3) *dec_m + quad* (1-dec_m);
377per_frame_31= if (gmegabuf(n+3) > gmegabuf (maxind*8+3), maxind =i,0);
378per_frame_32= qavg = qavg+pow (gmegabuf(n+3),2);
379per_frame_33= tess += beatsin* pow(gmegabuf(n+3)/gmegabuf(maxind*8+3),1)*5;
380per_frame_34= i += 1;
381per_frame_35=);
382per_frame_36=qavg = sqrt (qavg/num_res);
383per_frame_37=certain = gmegabuf(maxind*8+3)/qavg;
384per_frame_38=dbl_beat = gmegabuf(maxind*8+2) * gmegabuf (maxind*8+4) < 0;
385per_frame_39=bcount += dbl_beat;
386per_frame_40=is_rbeat = dbl_beat && (bcount%2==0);
387per_frame_41=bcount2 += is_rbeat;
388per_frame_42=
389per_frame_43=is_rbeat2 =is_rbeat * (bcount%2==0);
390per_frame_44=is_rbeat4 =is_rbeat * (bcount%4==0);
391per_frame_45=is_rbeat8 =is_rbeat * (bcount%8==0);
392per_frame_46=Freq = (maxind/(num_res-1)+minbpm/(maxbpm-minbpm))*(maxbpm-minbpm)/60;
393per_frame_47=Freq_ = Freq_* dec_s + (1-dec_s)*Freq;
394per_frame_48=trad1 = trad1 + Freq_*dt*6.28/8;
395per_frame_49=
396per_frame_50=speed_ = speed_*dec_xs + (1-dec_xs)*Freq_*1.2;
397per_frame_51=
398per_frame_52=trig = (index==4) && is_beat;
399per_frame_53=if (trig, dyang = 0.007*(rand(100)-50)* rand(10)/10, 0);
400per_frame_54=pyr = pyr*dec_xs + (1-dec_xs)*dyang;
401per_frame_55=pyr2 = pyr2*dec_xs + (1-dec_xs)*pyr;
402per_frame_56=
403per_frame_57=test = 0;
404per_frame_58=fwx = fwx + (speed_)* sin(zang+test)*0.02/fps;
405per_frame_59=fwy = fwy + (speed_)* cos(zang+test)*0.02/fps;
406per_frame_60=
407per_frame_61=//#############################################
408per_frame_62=q5 = fwx; q6 = fwy; q7 = 0.3;
409per_frame_63=
410per_frame_64=yang = pyr2;
411per_frame_65=trig = is_beat * (index==26);
412per_frame_66=ran1 = if (trig, int(rand(4))*-0.7/3-0.08, ran1);
413per_frame_67=xang = ran1;
414per_frame_68=xang = -0.7 * (1.1-pow(cos(trad1/16),12));
415per_frame_69=zang = zang + yang/6/fps*speed_/xang;
416per_frame_70=pos_x = 0;
417per_frame_71=pos_y = 0;
418per_frame_72=pos_z = 0.24* (1+0.125*sin(2*zang))* aspecty*( 1.5- abs(xang)/2);
419per_frame_73=q30 = .1/pos_z*cos(xang);
420per_frame_74=
421per_frame_75=ox = -pos_x; oy = -pos_y; oz = pos_z;
422per_frame_76=mx = ox*cos(zang) - oy*sin(zang);
423per_frame_77=my = ox*sin(zang) + oy*cos(zang);
424per_frame_78=ox = mx;oy = my;
425per_frame_79=mx = ox*cos(yang) + oz*sin(yang);
426per_frame_80=mz = - ox*sin(yang) + oz*cos(yang);
427per_frame_81=ox = mx;oz = mz;
428per_frame_82=my = oy*cos(xang) - oz*sin(xang);
429per_frame_83=mz = oy*sin(xang) + oz*cos(xang);
430per_frame_84=oy = my;oz = mz;
431per_frame_85=q11=ox; q12 = oy; q13 = oz; //Position
432per_frame_86=
433per_frame_87=//Vektor x nach rechts
434per_frame_88=ox = 1; oy = 0; oz = 0;
435per_frame_89=mx = ox*cos(zang) - oy*sin(zang);
436per_frame_90=my = ox*sin(zang) + oy*cos(zang);
437per_frame_91=ox = mx;oy = my;
438per_frame_92=mx = ox*cos(yang) + oz*sin(yang);
439per_frame_93=mz = - ox*sin(yang) + oz*cos(yang);
440per_frame_94=ox = mx;oz = mz;
441per_frame_95=my = oy*cos(xang) - oz*sin(xang);
442per_frame_96=mz = oy*sin(xang) + oz*cos(xang);
443per_frame_97=oy = my;oz = mz;
444per_frame_98=q14=ox; q15 = oy; q16 = oz;
445per_frame_99=
446per_frame_100=//Vektor z nach hinten
447per_frame_101=ox = 0; oy = 0; oz = 1;;
448per_frame_102=mx = ox*cos(zang) - oy*sin(zang);
449per_frame_103=my = ox*sin(zang) + oy*cos(zang);
450per_frame_104=ox = mx;oy = my;
451per_frame_105=mx = ox*cos(yang) + oz*sin(yang);
452per_frame_106=mz = - ox*sin(yang) + oz*cos(yang);
453per_frame_107=ox = mx;oz = mz;
454per_frame_108=my = oy*cos(xang) - oz*sin(xang);
455per_frame_109=mz = oy*sin(xang) + oz*cos(xang);
456per_frame_110=oy = my;
457per_frame_111=oz = mz;
458per_frame_112=q17=ox; q18 = oy; q19 = oz;
459per_frame_113=
460per_frame_114=q20 = xang;
461per_frame_115=q21 = yang;
462per_frame_116=q22 = zang;
463per_frame_117=
464per_frame_118=q32 = aspecty;
465per_frame_119=q4 = min(max(0,vol-vol_),4);
466per_frame_120=q4 *= max(0,3*cos(trad1)-2)*8;
467per_frame_121=
468per_frame_122=q2 = is_rbeat;
469per_frame_123=q3 = gmegabuf(maxind*8+2)>0;
470per_frame_124=//q3 = bcount2%2;
471per_frame_125=monitor = freq_*60;
472per_pixel_1=zoom = 1; rot = 0; dx = 0; dy = 0; warp = 0.002;
473warp_1=`#define sat saturate
474warp_2=`sampler sampler_pw_noise_lq;
475warp_3=`float streetx, streety,streetr,street;
476warp_4=`float2 uv0, uv1, uv2, uv3;
477warp_5=`
478warp_6=`shader_body {
479warp_7=`//uv = uv_orig;
480warp_8=`uv1 = (uv-.5);
481warp_9=`uv2 = sin(uv*3.1416*2)/2;
482warp_10=`
483warp_11=`float p1 = 100;
484warp_12=`float p2 = 2;
485warp_13=`streetx = 1- min(sat(p1*abs(uv2.x) -p2),sat(2*p1*abs(abs(uv1.x)-0.25)-p2));
486warp_14=`streety = 1- min(sat(p1*abs(uv2.y) -p2),sat(2*p1*abs(abs(uv1.y)-0.25)-p2));
487warp_15=`streetr = 1- sat(p1*abs(rad/aspect.y*1.07-0.5) -p2*1.75);
488warp_16=`
489warp_17=`street = max(streetx,streety);
490warp_18=`street = max(street,streetr);
491warp_19=`
492warp_20=`float3 orig = 0.08;
493warp_21=`
494warp_22=`uv2 = (uv-0.3).yx*2;
495warp_23=`float3 copy = lerp (GetPixel(uv2), GetBlur1(uv2),0);
496warp_24=`ret.r = lerp (orig,copy,0.5) ;
497warp_25=`
498warp_26=`//Kreisverkehr
499warp_27=`uv3 = float2 (rad/aspect.y*1.07, ang/4*2);
500warp_28=`uv3.y += (int(uv3.x*64)%8-4)*-0.024*time;
501warp_29=`ret.b = ((1*tex2D (sampler_pw_noise_lq, uv3).r) > 0.95) *(streetr>0.99) * 0.8;;
502warp_30=`
503warp_31=`
504warp_32=`//horizontale Fahrtrichtung
505warp_33=`uv3 = uv_orig*texsize.xy*texsize_noise_lq.zw*float2(0.5,1);
506warp_34=`uv3.x += (int(uv_orig.y*texsize_noise_lq.y)%8-4)*time*.015;
507warp_35=`ret.b += ((1*tex2D (sampler_pw_noise_lq, uv3).r) > 0.94)* (streety>0.99) ;;
508warp_36=`
509warp_37=`//vertikale Fahrtrichtung
510warp_38=`uv3 = uv_orig*texsize.xy*texsize_noise_lq.zw*float2(1,0.5);
511warp_39=`uv3.y += (int(uv_orig.x*texsize_noise_lq.x)%8-4)*time*.023;
512warp_40=`ret.b += ((1*tex2D (sampler_pw_noise_lq, uv3).r) > 0.94)* (streetx>0.99) ;;
513warp_41=`
514warp_42=`
515warp_43=`//Lichter
516warp_44=`ret.b += (frac(32*ret.r+time*0.002)>0.95) * !street*0.7;
517warp_45=`ret.b += street*0.15;
518warp_46=`
519warp_47=`ret.b = max (ret.b*1, GetPixel(uv).b *0.75 * (GetPixel(uv).b > 0));
520warp_48=`ret.r = ret.r*(1-street) ;
521warp_49=`
522warp_50=`
523warp_51=`
524warp_52=`}
525comp_1=`sampler sampler_pw_noise_lq;
526comp_2=`static const float quality = 5, depth = q30, z0=4, scale = 1.0/quality*-depth/z0;
527comp_3=`float3 neu, rsl, rsl0, rsl00, screen3;
528comp_4=`float2 uv0, uv1, uv2, uv4, uv5, rsk, dz1;
529comp_5=`float lprof,noise,cloud,gmask,dx,dy,test,tmp;
530comp_6=`static float lav_gnd = 0;
531comp_7=`static float3 mov = float3 (q5,q6, q7);
532comp_8=`static float3 t = float3(q14,q15,q16);
533comp_9=`static float3 s = float3(q17,q18,q19);
534comp_10=`static float3 ts = -cross(s,t);
535comp_11=`static float3 pos = float3 (q11,q12,q13);
536comp_12=`
537comp_13=`float3 project (float gnd) { float z;
538comp_14=` z = -1/mul(cross(ts,-t),screen3); z = z-gnd ;
539comp_15=` gmask = (z >= -6) * (z <= 6);
540comp_16=` return float3(mul(float2x3(ts,t),cross(pos,screen3))*z*gmask*aspect.yx,-z);}
541comp_17=`
542comp_18=`float3 GetBlur0 ( float2 uvi) {float3 tmp;
543comp_19=` tmp = GetPixel(uvi) + GetPixel (uvi+texsize.zw*float2(1,0))
544comp_20=` + GetPixel (uvi+texsize.zw*float2(-1,0)) + GetPixel (uvi+texsize.zw*float2(0,1))
545comp_21=` + GetPixel (uvi+texsize.zw*float2(0,-1));
546comp_22=` return lerp (tmp*0.2, GetBlur1(uvi), 1);}
547comp_23=`
548comp_24=`shader_body {
549comp_25=`//uv += 0.01*sin(7*length(uv-0.5)-q2) * normalize(uv-0.5);
550comp_26=`screen3 = float3 ((uv-float2(.5,.5))*aspect.xy,1);//wirkt wie zoom / Tele ###
551comp_27=`
552comp_28=`lav_gnd = -0.022; //#####
553comp_29=` for (int m=1; m <= quality; m++) {
554comp_30=` rsl = (project (lav_gnd)+float3 (mov));
555comp_31=` lprof = floor(z0*1-2*z0*GetPixel(rsl.xy).r )*scale ;
556comp_32=` lav_gnd += lprof;
557comp_33=` }
558comp_34=`rsl = project (lav_gnd)+ mov; //#######
559comp_35=`float streetlevel = saturate(-10*depth-12*lav_gnd);
560comp_36=`float cmask = streetlevel > 0.05;
561comp_37=`
562comp_38=`float3 backnoise = lerp (tex2D (sampler_noise_hq,(rsl.xy)/6), 0.5, 0.2);
563comp_39=`float3 lights = .1/length(cos(rsl.xy*26+rand_preset.xy*1.1))* backnoise;
564comp_40=`
565comp_41=`float d = 0.0008;
566comp_42=`dy = GetPixel(rsl.xy+d) - GetPixel(rsl.xy-d);
567comp_43=`dy += (GetPixel(rsl*3+d) - GetPixel(rsl*3-d))*saturate(lav_gnd/depth+1)/2;
568comp_44=`
569comp_45=`rsl00 = project (-depth);
570comp_46=`rsl0 = rsl00+mov;
571comp_47=`ret = saturate(dy)*lights* (0.2+tex2D(sampler_noise_hq,rsl0.xy*0.06).r)*14;
572comp_48=`ret += lights*saturate(-6*lav_gnd* (rand_preset.x+0.2))*3;
573comp_49=`
574comp_50=`ret *= 1+12*GetBlur0(frac(rsl0.xy)).b *saturate(streetlevel*2);
575comp_51=`float3 car = GetPixel(frac(rsl0.xy)).b;
576comp_52=`if (GetPixel(rsl0.xy).r >0.1) {car *= tex2D(sampler_noise_lq,rsl0.xy)*2;};
577comp_53=`ret += car * cmask;
578comp_54=`
579comp_55=`//distant fog
580comp_56=`ret = lerp (ret, float3(0.2,0.1,0), saturate(pow(rsl0.z/3,2)));
581comp_57=`
582comp_58=`float flash = 0.02/length(sin(6*rsl0.xy+2*dy+3*rand_frame.zx));
583comp_59=`ret += flash*saturate(0.2-4*lav_gnd)* q4 * float3(0.2,.5,1) *(1-uv.y);
584comp_60=`//ret += q2 * (lav_gnd + dy) * float3 (0,0.5,1) * (1-uv.y);
585comp_61=`//ret = GetPixel(uv);
586comp_62=`
587comp_63=`}
588comp_64=`
589comp_65=`written by martin
590comp_66=`END